/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package thienphuc.patient.dao.impl;

import java.util.List;
import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Restrictions;
import thienphuc.patient.dao.AbstractHibernateDaoSupport;
import thienphuc.patient.dao.LoaiDichVuDAO;
import thienphuc.patient.dto.LoaiDichVu;

/**
 *
 * @author QuocDat
 */
public class LoaiDichVuDAOImpl extends AbstractHibernateDaoSupport<LoaiDichVu, Integer> implements LoaiDichVuDAO {

    public LoaiDichVuDAOImpl(Class<LoaiDichVu> classPersistent) {
        super(classPersistent);
    }

    public List<LoaiDichVu> findByTenLoaiDichVu(String tenLoaiDichVu) throws Exception {
        Criterion criterionTenLoaiDichVu = Restrictions.like(LOAI_DICH_VU_TEN_LOAI_DICH_VU, tenLoaiDichVu);
        return this.findByCriteria(criterionTenLoaiDichVu);
    }
}
